//
//  IssueVC.swift
//  NewDelivery
//
//  Created by 天下宅 on 2016/11/8.
//  Copyright © 2016年 天下宅. All rights reserved.
//

import UIKit

class IssueVC: BaseVC {

    var textView:UITextView!
    
    var scrollView:UIScrollView!
    
    var textField:UITextField!
    
    var imagesScrollView:WKPhotoViews!
    override func viewDidLoad() {
        super.viewDidLoad()
        let nav = WKNavView.creatNavView(WithTitle: "问题反馈", vProtocol: self)
        self.view.addSubview(nav)
        nav.leftImage = UIImage.init(named: "左箭头")
        self.view.backgroundColor = UIColor.groupTableViewBackground

        
        
        
        scrollView = UIScrollView.init(frame: CGRect.init(x: 0, y: 64, width: screenWidth, height: screenHeight - 64))
        scrollView.backgroundColor = UIColor.groupTableViewBackground
        self.view.addSubview(scrollView)

        let issueLabel = UILabel.init(frame: CGRect.init(x: 15, y: 15, width: 100, height: 20))
        issueLabel.textColor = UIColor.lightGray
        issueLabel.font = UIFont.systemFont(ofSize: 16)
        issueLabel.text = "问题和意见"
        scrollView.addSubview(issueLabel)

        
        textView = UITextView.init(frame: CGRect.init(x: 0, y: issueLabel.bottom + 15, width: screenWidth, height: 150))
        textView.backgroundColor = UIColor.white
        scrollView.addSubview(textView)
        textView.placeHolder = "请详细描述你的问题和意见"
        
        let photoLabel = UILabel.init(frame: CGRect.init(x: 15, y: textView.bottom + 15, width: 200, height: 20))
        photoLabel.textColor = UIColor.lightGray
        photoLabel.font = UIFont.systemFont(ofSize: 16)
        photoLabel.text = "图片(选填，提供问题截图)"
        scrollView.addSubview(photoLabel)
        
        imagesScrollView = WKPhotoViews.init(macC: 4,thisVC: self)
        imagesScrollView.origin = CGPoint.init(x: 0, y: photoLabel.bottom + 15)
        imagesScrollView.backgroundColor = UIColor.white
        scrollView.addSubview(imagesScrollView)
        
        //150
        
        let qqLabel = UILabel.init(frame: CGRect.init(x: 15, y: imagesScrollView.bottom + 15, width: 150, height: 20))
        qqLabel.textColor = UIColor.lightGray
        qqLabel.font = UIFont.systemFont(ofSize: 16)
        qqLabel.text = "QQ/邮箱"
        scrollView.addSubview(qqLabel)
        
        textField = UITextField.init(frame: .init(x: 0, y: qqLabel.bottom + 15, width: screenWidth, height: 40))
        textField.placeholder = "（选填，方便我们联系您）"
        textField.backgroundColor = UIColor.white
        scrollView.addSubview(textField)
        
        let btn = UIButton.button(withTitle: "提交反馈", bgColor: UIColor.color(WithHexString: "#2ED423"))
        btn.frame = CGRect.init(x: 10, y: textField.bottom + 30, width: screenWidth - 20, height: 50)
        btn.layer.cornerRadius = 5
        scrollView.addSubview(btn)
        btn.addTarget(self, action: #selector(btnClick), for: .touchUpInside)
        
        
        scrollView.contentSize = CGSize.init(width: screenWidth, height: btn.bottom + 10)
        // Do any additional setup after loading the view.
    }

    func btnClick()  {

    }
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
